$OpenBSD: patch-Makefile,v 1.3 2012/09/07 08:12:50 sthen Exp $
--- Makefile.orig	Sat Nov  8 14:47:24 2008
+++ Makefile	Mon Sep  3 12:40:28 2012
@@ -10,7 +10,7 @@ prepare:
 	echo '@ISA = qw(Exporter);' >> c_stuff/lib/fb_config.pm
 	echo '@EXPORT = qw($$FPATH $$FLPATH);' >> c_stuff/lib/fb_config.pm
 	echo '$$FPATH = "$(DATADIR)/frozen-bubble";' >> c_stuff/lib/fb_config.pm
-	echo '$$FLPATH = "$(LIBDIR)/frozen-bubble";' >> c_stuff/lib/fb_config.pm
+	echo '$$FLPATH = "$(LIBEXECDIR)/frozen-bubble";' >> c_stuff/lib/fb_config.pm
 	perl -ne "print \$$1 if m|\\\$$version = '(.*)';|" c_stuff/lib/fb_stuff.pm > VERSION
 
 dirs:
@@ -25,12 +25,21 @@ install: $(ALL)
 	@for n in $(DIRS); do \
 		(cd $$n; $(MAKE) install) \
 	done
-	install -d $(DESTDIR)$(BINDIR)
-	install frozen-bubble frozen-bubble-editor $(DESTDIR)$(BINDIR)
-	install -d $(DESTDIR)$(DATADIR)/frozen-bubble
-	cp -a gfx snd data $(DESTDIR)$(DATADIR)/frozen-bubble
-	install -d $(DESTDIR)$(MANDIR)/man6
-	install doc/*.6 $(DESTDIR)$(MANDIR)/man6
+	${BSD_INSTALL_PROGRAM_DIR} $(DESTDIR)$(BINDIR)
+	${BSD_INSTALL_PROGRAM} frozen-bubble frozen-bubble-editor $(DESTDIR)$(BINDIR)
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(DATADIR)/frozen-bubble
+	${BSD_INSTALL_DATA_DIR} $(DESTDIR)$(DATADIR)/frozen-bubble/{gfx/{menu/anims,balls,flags,intro,pinguins},snd,data}
+	${BSD_INSTALL_DATA} gfx/*.{png,gif} $(DESTDIR)$(DATADIR)/frozen-bubble/gfx
+	${BSD_INSTALL_DATA} gfx/balls/*.{png,gif} $(DESTDIR)$(DATADIR)/frozen-bubble/gfx/balls
+	${BSD_INSTALL_DATA} gfx/menu/*.png $(DESTDIR)$(DATADIR)/frozen-bubble/gfx/menu
+	${BSD_INSTALL_DATA} gfx/menu/anims/*.png $(DESTDIR)$(DATADIR)/frozen-bubble/gfx/menu/anims
+	${BSD_INSTALL_DATA} gfx/flags/*.png $(DESTDIR)$(DATADIR)/frozen-bubble/gfx/flags
+	${BSD_INSTALL_DATA} gfx/intro/*.png $(DESTDIR)$(DATADIR)/frozen-bubble/gfx/intro
+	${BSD_INSTALL_DATA} gfx/pinguins/*.png $(DESTDIR)$(DATADIR)/frozen-bubble/gfx/pinguins
+	${BSD_INSTALL_DATA} snd/* $(DESTDIR)$(DATADIR)/frozen-bubble/snd
+	${BSD_INSTALL_DATA} data/* $(DESTDIR)$(DATADIR)/frozen-bubble/data
+	${BSD_INSTALL_MAN_DIR} $(DESTDIR)$(MANDIR)/man6
+	${BSD_INSTALL_MAN} doc/*.6 $(DESTDIR)$(MANDIR)/man6
 
 clean: 
 	@for n in $(DIRS); do \
